function [nInput nOutput2] = GenerateInput( dataset )
    global currentInput;
    global TRAININT_PATTERN_SIZE;
    global SIZE;
    
    %SIZE(1) = dimension de la entrada
    
    %si no hay mas inputs empiezo de vuelta;
    if currentInput > size(dataset,1)
        currentInput = 1;
    end
    
    nInput = dataset(currentInput:SIZE(1)+currentInput-1,1);
    nOutput = dataset(currentInput:SIZE(1)+currentInput-1,2);

    cont = 0;
    nOutput2 = -1;
    for k=1:size(nOutput,1)
        if nOutput(k) == 1
           cont = cont + 1;
        else
            cont = 0;
        end
        if cont == 3;
           nOutput2 = 1;
           break;
        end
    end

    currentInput = currentInput + 18;

    if ( currentInput > TRAININT_PATTERN_SIZE )
        currentInput = 1;
    end
    
    %nInput = nInput';
end
